<script setup>
import { ref } from "vue";
import {useRouter} from "vue-router";
const router = useRouter()
const value = ref('');
const num = ref(1)
const isClickFn = () => {
  router.push('/SelectProducts')
};
</script>

<template>
  <div class="style1 p-[5px]">
    <van-field
        readonly
        clickable
        required
        name="picker"
        v-model="value"
        label="选择商品"
        placeholder="请选择商品"
        :rules="[{ required: true, message: '请选择商品' }]"
        @click="isClickFn"
    />
    <div class="padding">
      <van-card
          v-for="item in 3"
          price="2.00"
          desc="DYJ"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
          centered="true"
      >
        <template #footer>
          <van-stepper v-model="num" theme="round" button-size="22" disable-input />
        </template>
      </van-card>
    </div>
  </div>
</template>

<style scoped lang="less">
::v-deep{
  .van-card__price{
    color: red
  }
}
</style>